#include<iostream>
#include<string>
using namespace std;
string addStrings(string num1, string num2) 
{
	reverse(num1.begin(), num1.end());
	reverse(num2.begin(), num2.end());
	string ret;
	int n1 = 0;
	int n2 = 0;
	int i = 0;
	while (i < num1.size() && i < num2.size())
	{
		n1 = num1[i] + num2[i] - 2 * '0' + n2;
		n2 = n1 / 10;
		n1 %= 10;
		//if(n1!=0)
		ret += (n1 + '0');
		++i;
	}
	while (i < num1.size())
	{
		n1 = num1[i] + n2 - '0';
		n2 = n1 / 10;
		n1 %= 10;
		ret += (n1 + '0');
		++i;
	}
	while (i < num2.size())
	{
		n1 = num2[i] + n2 - '0';
		n2 = n1 / 10;
		n1 %= 10;
		ret += (n1 + '0');
		++i;
	}
	if (n2 != 0)
		ret += (n2 + '0');
	//ret.reserve();
	reverse(ret.begin(), ret.end());
	return ret;
}
void test()
{
	string s1("999999999999");
	string s2("11");
	cout << addStrings(s1, s2) << endl;
}
int main()
{
	//string str1;
	//getline(cin, str1);
	//cout << str1 << endl;
	test();
	//string s1("112");
	//s1.reserve(0,);
	//s1.reserve()
	//reverse(s1.begin(), s1.end());
	//cout << s1 << endl;
	return 0;
}







